package com.pets.springboot_petshop.service.impl;

import com.pets.springboot_petshop.entity.Pettype;
import com.pets.springboot_petshop.mapper.PettypeMapper;
import com.pets.springboot_petshop.service.PettypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: wxk
 * @Email: 2089967794@qq.com
 * @Date: 2024/10/12 上午9:52 周六
 * @Description: 宠物类型实现类
 */
@Service
public class PettypeServiceImpl implements PettypeService {
    @Autowired
    private PettypeMapper pettypeMapper;

    @Override
    public Pettype selectPettype(int id) {
        return pettypeMapper.selectPettype(id);
    }

    @Override
    public int selectName(String pettypeName) {
        return pettypeMapper.selectName(pettypeName);
    }

    @Override
    public Pettype selectPettypename(String name) {
        return pettypeMapper.selectPettypename(name);
    }

    @Override
    public List<Pettype> findAll() {
        return pettypeMapper.findAll();
    }

    @Override
    public int addPettype(Pettype pettype) {
        return pettypeMapper.addPettype(pettype);
    }

    @Override
    public int deletePettypeById(int id) {
        return pettypeMapper.deletePettypeById(id);
    }

    @Override
    public int updatePettypeById(Pettype pettype) {
        return pettypeMapper.updatePettypeById(pettype);
    }
}
